home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / cfg_structs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-21  |  4.4 KB  |  149 lines

  1. /*  SVGATextMode -- An SVGA textmode manipulation/enhancement tool
  2.  *
  3.  *  Copyright (C) 1995,1996  Koen Gadeyne
  4.  *
  5.  *  This program is free software; you can redistribute it and/or modify
  6.  *  it under the terms of the GNU General Public License as published by
  7.  *  the Free Software Foundation; either version 2 of the License, or
  8.  *  (at your option) any later version.
  9.  *
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU General Public License
  16.  *  along with this program; if not, write to the Free Software
  17.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20.  
  21. /***
  22.  *** Config file parsing structures and data types for SVGATextMode.
  23.  *** Used by lex/yacc parser.
  24.  ***
  25.  ***/
  26.  
  27. #include "misc.h"
  28.  
  29. #ifndef _CFG_STRUCTS_H
  30. #define _CFG_STRUCTS_H
  31.  
  32. /*** mode line attributes ***/
  33.  
  34. #define ATTR_INTERLACE   1<<0
  35. #define ATTR_DOUBLESCAN  1<<1
  36.  
  37. /*** monitor refresh limits struct ***/
  38.  
  39. #define MAX_RANGE_SPECS  32
  40.  
  41. #define DEFLT_HSYNC_MIN  30.0
  42. #define DEFLT_HSYNC_MAX  32.0
  43. #define DEFLT_VSYNC_MIN  45.0
  44. #define DEFLT_VSYNC_MAX  80.0
  45.  
  46. typedef struct _TMT t_mon_timing;
  47. struct _TMT {
  48.     int low_limit;
  49.     int high_limit;
  50.     t_mon_timing *next;
  51. };
  52.  
  53. typedef struct _TERMDEF t_terminals;
  54. struct _TERMDEF {
  55.     char *name;
  56.     t_terminals *next;
  57. };
  58.  
  59. typedef struct t_fontdef {
  60.         char *fontpath;
  61.         char *fontprogpath;
  62.         char *font_table[2][32];          /* font string table */
  63. } t_fontdef;
  64.  
  65. #define DEFAULT_FONTPROGPATH  "/usr/bin/setfont"
  66. #define DEFAULT_FONTPATH      "/usr/lib/kbd/consolefonts"
  67.  
  68. #define INIT_FONTDATA { DEFAULT_FONTPATH, DEFAULT_FONTPROGPATH, }
  69.  
  70. /*** mode line definitions ***/
  71.  
  72. typedef enum e_sync_pol  { POS=1 , NEG } sync_pol ;
  73.  
  74. typedef struct _TTM t_mode;
  75. struct _TTM {
  76.     char *name;
  77.     int pixelClock;                                 /* Pixel clock in kHz. */
  78.     int HDisplay, HSyncStart, HSyncEnd, HTotal;     /* Horizontal Timing. */
  79.     int HBlankStart, HBlankEnd;
  80.     int VDisplay, VSyncStart, VSyncEnd, VTotal;     /* Vertical Timing. */
  81.     int VBlankStart, VBlankEnd;
  82.     int FontWidth, FontHeight;                      /* font size */
  83.     sync_pol hpol, vpol;                            /* sync polarities */
  84.     int hfreq, vfreq;                               /* refresh frequencies in Hz(H) and milliHerz(V) */
  85.     int cols, rows;                                 /* screen geometry */
  86.     int flags;
  87.     t_mode *next;
  88. };
  89.  
  90. #define MOFLG_SET(m,opt)    ((m)->flags |= (opt))
  91. #define MOFLG_ISSET(m,opt)  ( ((m)->flags & (opt)) != 0 )
  92.  
  93. /*** clock config struct ***/
  94.  
  95. #define MAX_CLOCKS              128   /* I suppose there are no chipsets with more clocks out there */
  96.  
  97. /* Some very arbitrary clock limits */
  98. #define MIN_CLOCK               0.0   /* must be 0 to allow "dummy" clock values in clocks line */
  99. #define MAX_CLOCK               500.0
  100.  
  101. #define MIN_MCLK        30.0
  102. #define MAX_MCLK        80.0
  103.  
  104. #define MIN_RCLK        4.0
  105. #define MAX_RCLK        62.0
  106.  
  107. #define MCLK_NOT_DEFINED  -1.0 
  108. #define REFCLK_NOT_DEFINED  -1.0 
  109. #define DEFAULT_MAXCLOCK  45000
  110.  
  111. /* the return structure. Only part of it will be used, depending on clock type */
  112. typedef struct t_clockdef {
  113.     int num_clocks;              /* number of clocks in clocks line, and thus in array below */
  114.     int clockchiptype;           /* if used: ClockChip type */
  115.     int maxclock;                /* maximum allowed clock ("DacSpeed") */
  116.     int refclk;                  /* Reference frequency. Most cards use 14.31818 MHz, but IBM RGM RAMDAC's don't...*/
  117.     int mclk;                    /* memory clock (some cards only) */
  118.     char *ck_prog_path;          /* if used: path to ClockProg */
  119.     int clocks[MAX_CLOCKS*2];    /* if used: array of clock values */
  120. } t_clockdef;
  121.  
  122. #define INIT_CLOCKDEF { 0 , CLKCHIP_NONE , DEFAULT_MAXCLOCK, REFCLK_NOT_DEFINED, MCLK_NOT_DEFINED, NULL, }
  123.  
  124.  
  125. /*** external definitions (globals) ***/
  126.  
  127. extern int addhsync(float min, float max);
  128. extern int addvsync(float min, float max);
  129.  
  130. extern t_mode *text_mode_list;
  131. extern t_mon_timing *h_mon_limits;
  132. extern t_mon_timing *v_mon_limits;
  133. extern t_clockdef clock_data;
  134. extern t_terminals *p_terminals;
  135. extern t_fontdef font_data;
  136. extern int chipset;
  137. extern char *resetprogpath;
  138. extern char *defaultmode;
  139. extern int underline_pos;
  140. extern int bordercolor;
  141. extern int cursor_start, cursor_end;
  142.  
  143.  
  144.  
  145. #endif  
  146.  
  147.  
  148.  
  149.